<?php $section = 'Users'; ?>
<?php include('inc/functions.php'); ?>
<?php include('Users/data.php'); ?>
<?php $conn = getConnection();
	  $result = $conn->query("SELECT * FROM 2011_Users");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Core[nerd]-Users</title>
<link href="inc/main.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="container">
	<?php include('inc/nav.php'); ?>
	<h1>Users</h1>
	<div id="users">
	<table>
		<tr>
			<th>First Name</th>
			<th>Last Name</th>
		</tr>
	<?php 
	while($rs = $result->fetch_assoc()) 
	{?>
	<tr>
		<td><?php echo $rs['FirstName']; ?></td>
		<td><?php echo $rs['LastName']; ?></td>
		<td>
			<a href="Users/edit.php?id=<?=$rs['id']?>">Edit</a>
	        <a href="Users/delete.php?id=<?=$rs['id']?>">Delete</a>
	        <a href="Users/details.php?id=<?=$rs['id']?>">View Details</a>	
	   </td>
	</tr>
	<?php } ?> 	
	</table>
	<table><tr>
		<td><a id="register" href="Users/register.php" ><input type="button" value="Register" ></td>
	</tr></table>
	</div>
	
</div>
</body>

</html>
